<?php
/**
 * Created by Alan.
 * User: Alan
 * Date: 2018\10\8 0008
 * Time: 13:42
 */

namespace app\api\controller;
use think\Controller;

class Image extends Controller
{
    public function upload()
    {
        $file = request()->file('file');
        $info = $file->move('upload');
        if($info){
            return show(1,'success','/'.$info->getPathname());
        }
        return show(0,'upload error');
    }
}